import Vue from "vue";
import {
  Button,
  message,
  ConfigProvider,
  Row,
  Col,
  Badge,
  Input,
  Table,
  Avatar,
  Timeline,
  Drawer,
  Icon,
  Tag,
  Spin,
  Divider,
  Radio,
  Checkbox,
  Tabs,
  BackTop,
  Modal,
  List,
  Skeleton,
  Card,
  Collapse,
} from "ant-design-vue";

const antComponent = {
  Button,
  message,
  ConfigProvider,
  Row,
  Col,
  Badge,
  Input,
  Table,
  Avatar,
  Timeline,
  Drawer,
  Icon,
  Tag,
  Spin,
  Divider,
  Radio,
  Checkbox,
  Tabs,
  BackTop,
  Modal,
  List,
  Skeleton,
  Card,
  Collapse,
};

((component: any = antComponent) => {
  Object.keys(component).length &&
    Object.keys(component).map((name) => {
      Vue.use(component[name]);
    });
})();
